<!-- 分类 -->
<template>
	<view class="category-box">
		<view class="appoint">
			<view class="appoint-list-item" v-for="(store,indx) in storeList" :key="indx">
				<view class="appoint-item-left">
					<image :src="store.image_first" mode="aspectFill" class="item-img"></image>
				</view>
				<view class="appoint-item-right">
					<view class="t0">{{ store.name }}</view>
					<view class="t1">{{store.desc}}</view>
					<view class="t1">{{store.phone}}</view>
					<view class="t1">{{ store.city_name }}{{ store.area_name }}{{ store.address }}</view>
				</view>
			</view>
			<!-- 缺省页 -->
			<shopro-empty marginTop="300rpx" v-if="isEmpty" :image="$IMG_URL + '/imgs/empty/empty_goods.png'" tipText="暂无数据"></shopro-empty>
		</view>
    <!--   购物车的按钮-->
    <shopro-float-shopcart-btn></shopro-float-shopcart-btn>
		<!-- 登录提示 -->
		<shopro-auth-modal></shopro-auth-modal>
	</view>
</template>

<script>
	import { mapMutations, mapActions, mapState, mapGetters } from 'vuex';
export default {
	components: {
	},
	data() {
		return {
			storeList: [],
			isEmpty:false
		};
	},
	computed: {
	},
	onLoad() {
		this.getStoreList();
	},
	methods: {
	...mapActions(['getUserInfo', 'showAuthModal', 'getUserData' ,'logout']),
		// 获取门店列表
		getStoreList() {
			let that = this;
			that.$https('store.list', {}, '加载中...').then(res => {
				if (res.code == 1) {
					that.storeList = res.data.data;
					this.isEmpty=!that.storeList.length
				}
			});
		},
		// 路由跳转
		jump(path, parmas) {
			this.$Router.push({
				path: path,
				query: parmas
			});
		}
	}
};
</script>

<style lang="scss">
.category-box {
	height: 100%;
	overflow: hidden;
	.appoint-list-item{
		display: flex;
		padding: 20rpx;
		border-bottom: 1rpx solid #E5E5E5;
		.appoint-item-left{
			margin-right: 30rpx;
			.item-img{
				width: 200rpx;
				height: 200rpx;
			    border-radius: 16rpx;
			}
		}
		.appoint-item-right{
			.t0{
				font-size: 32rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #010101;
				line-height: 32rpx;
				margin-bottom: 20rpx;
			}
			.t1{
				font-size: 28rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #8E8E8E;
				line-height: 32rpx;
				margin-bottom: 20rpx;
			}
		}
	}
}
</style>
